package com.lancoo.ccas53.mapper;

import com.lancoo.ccas53.entity.PlanTeaching;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.ccas53.config.MybatisRedisCache;
import com.lancoo.ccas53.pojo.vo.TeachingClassCourseDto;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 教务获取教学计划,相当于专业版本 Mapper 接口
 * </p>
 *
 * @author quin.song
 * @since 2024-05-20
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface PlanTeachingMapper extends BaseMapper<PlanTeaching> {

    int addBatch(@Param("planTeachingCollection") Collection<PlanTeaching> planTeachingCollection);

    /**
     * 根据教学计划 年级 专业 学院 获取课程
     *
     * @param taskId
     * @param courseTypeId
     * @param courseNature
     * @param credit
     * @param keyWord
     * @param collegeId
     * @param majorId
     * @param gradeId
     * @return
     */
    List<TeachingClassCourseDto> getCourseByPlan(@Param("taskId") Integer taskId, @Param("courseTypeId") String courseTypeId,
                                                 @Param("courseNature") Integer courseNature, @Param("credit") Double credit,
                                                 @Param("keyWord") String keyWord, @Param("baseCollegeId") String baseCollegeId,
                                                 @Param("majorId") String majorId, @Param("gradeId") String gradeId);

    /**
     * 获取重修学生 课程
     *
     * @param taskId
     * @param courseTypeId
     * @param courseNature
     * @param credit
     * @param keyWord
     * @param baseStudentId
     * @return
     */
    List<TeachingClassCourseDto> getCourseRetake(@Param("taskId") Integer taskId,
                                                 @Param("schoolId") String schoolId,
                                                 @Param("term") String term,
                                                 @Param("courseTypeId") String courseTypeId,
                                                 @Param("courseNature") Integer courseNature,
                                                 @Param("credit") Double credit,
                                                 @Param("keyWord") String keyWord,
                                                 @Param("baseStudentId") String baseStudentId,
                                                 @Param("studyNature") Integer studyNature);


    List<PlanTeaching> getPlanTeaching(Integer taskId);
}
